package com.tsing.common.Demo;

public class TestSendMsg {

    public void testTcpUdp() throws Exception {

        //TcpUdpUtil.sendStrByTCP("192.168.0.106", 8888, "我是测试一下");

        //TcpUdpUtil.sendHexStrByTCP("192.168.0.106", 8888, "aa bb 00 cc dd");

        //TcpUdpUtil.sendStrByUDP("192.168.0.106", 8888, "测试一下");

        //TcpUdpUtil.sendHexStrByUDP("192.168.0.106", 8888, "05 09 AA CC");

        //TcpUdpUtil.sendHexStrByTCPAndReceive("192.168.0.106", 8888, "05 09 AA CC");

        //String s = TcpUdpUtil.sendHexStrByUDPAndReceive("192.168.38.1", 8234, "aa bb 00 cc dd");
        //System.out.println(s);

    }

    public void testHttp() throws Exception {

        /*HashMap<String, Object> map = new HashMap<>();
        map.put("pageNum", "2");
        map.put("pageSize", "5");
        String s = HttpClientUtil.doGet("http://59.110.136.110:8888/permission/permissionPage",
                "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxMzg0NTMyNjQ2ODkyNDQ1Njk3MTYxOTMxODM2ODY5NyJ9.2-PIRWZhpqkbIJpXT0lEUOUfLjQL1erCj7w3Xko2pz0",
                map);
        String data = JSONObject.parseObject(s).getString("data");
        String records = JSONObject.parseObject(data).getString("records");
        List<TestSendMsgVo> testSendMsgVos = JSONObject.parseArray(records, TestSendMsgVo.class);
        testSendMsgVos.forEach(System.out::println);*/

        /*JSONObject jsonObject = new JSONObject();
        jsonObject.put("username", "zzq");
        jsonObject.put("password", "zzq");
        String s = HttpClientUtil.doPost("http://59.110.136.110:8888/user/login", jsonObject, null);
        System.out.println(s);*/

    }

}
